package com.xqboss.apps.dto.equipment;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author Trent
 * @date 2023/8/17
 */
@Data
@ApiModel
public class EquipmentAttrTemplateDto {
    @ApiModelProperty(value = "模板名称", required = true)
    @NotNull(message = "请输入模板名称")
    private String name;

    @ApiModelProperty(value = "模板描述", required = true)
    private String description;

    @ApiModelProperty(value = "最小幸运值比例", required = true, example = "0.05")
    @NotNull(message = "请输入最小幸运值比例")
    @DecimalMax(value = "1.00", message = "最小幸运值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最小幸运值范围为：0% - 100%")
    private BigDecimal luckRatioMin;

    @ApiModelProperty(value = "最大幸运值比例", required = true, example = "0.1")
    @NotNull(message = "请输入最大幸运值比例")
    @DecimalMax(value = "1.00", message = "最大幸运值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最大幸运值范围为：0% - 100%")
    private BigDecimal luckRatioMax;

    @ApiModelProperty(value = "最小坚固值比例", required = true, example = "0.2")
    @NotNull(message = "请输入最小坚固值比例")
    @DecimalMax(value = "1.00", message = "最小坚固值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最小坚固值范围为：0% - 100%")
    private BigDecimal strongRatioMin;

    @ApiModelProperty(value = "最大坚固值比例", required = true, example = "0.24")
    @NotNull(message = "请输入最大坚固值比例")
    @DecimalMax(value = "1.00", message = "最大坚固值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最大坚固值范围为：0% - 100%")
    private BigDecimal strongRatioMax;

    @ApiModelProperty(value = "最小天赋值比例", required = true, example = "0.2")
    @NotNull(message = "请输入最小天赋值比例")
    @DecimalMax(value = "1.00", message = "最小天赋值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最小天赋值范围为：0% - 100%")
    private BigDecimal talentRatioMin;

    @ApiModelProperty(value = "最大天赋值比例", required = true, example = "0.2")
    @NotNull(message = "请输入最大天赋值比例")
    @DecimalMax(value = "1.00", message = "最大天赋值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最大天赋值范围为：0% - 100%")
    private BigDecimal talentRatioMax;

    @ApiModelProperty(value = "最小耐久值比例", required = true, example = "0.1")
    @NotNull(message = "请输入最小耐久值比例")
    @DecimalMax(value = "1.00", message = "最小耐久值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最小耐久值范围为：0% - 100%")
    private BigDecimal durableRatioMin;

    @ApiModelProperty(value = "最大耐久值比例", required = true, example = "0.45")
    @NotNull(message = "请输入最大耐久值比例")
    @DecimalMax(value = "1.00", message = "最大耐久值范围为：0% - 100%")
    @DecimalMin(value = "0.00", message = "最大耐久值范围为：0% - 100%")
    private BigDecimal durableRatioMax;

    @ApiModelProperty(value = "爆率信息", required = true)
    @Size(min = 1, message = "请输入至少一条爆率信息")
    @Valid
    private List<EquipmentAttrPointRatioDto> pointRatioList;
}
